Write-Output "Simple foreach a"
$a = 0..9
foreach ($element in $a) {
  $element
}

Write-Output "Simple for +2"

$a = 0..9
for ($i = 0; $i -le ($a.length - 1); $i += 2) {
  $a[$i]
}

Write-Output "Simple while lt 4"

$a = 0..9
$i=0
while($i -lt 4) {
  $a[$i]
  $i++
}